home *** CD-ROM | disk | FTP | other *** search
/ Basic Instinct 2 Press Kit / Basic Instinct 2 Press Kit.iso / pc / main.dxr / Internal_55_savedPhotoCode.ls < prev    next >
Encoding:
Text File  |  2006-03-15  |  4.2 KB  |  121 lines

  1. property spriteNum
  2. global gMaster, gSound, gNotes
  3.  
  4. on mouseUp me
  5.   gSound.mPlayButtonClick()
  6.   vName = sprite(spriteNum).member.name
  7.   if gMaster.pSavedSummaryList.count = 0 then
  8.     alert("you have a problem with gMaster.pSavedSummaryList.count")
  9.     exit
  10.   end if
  11.   repeat with x = 1 to gMaster.pSavedSummaryList.count
  12.     if gMaster.pSavedSummaryList[x].pSmallName = vName then
  13.       gMaster.pCount = gMaster.pSavedSummaryList[x].pNumber
  14.       if gMaster.pSavedSummaryList[x].pSelected = "no" then
  15.         mSetOn(me, x)
  16.       else
  17.         mSetOff(me, x)
  18.       end if
  19.       exit repeat
  20.     end if
  21.   end repeat
  22. end
  23.  
  24. on mouseEnter me
  25.   cursor(280)
  26. end
  27.  
  28. on mouseLeave me
  29.   cursor(-1)
  30. end
  31.  
  32. on mSetOn me, vSavedNum
  33.   if gMaster.pSummaryList[vSavedNum].pType contains "photo" then
  34.     vNum = gMaster.pSummaryList[vSavedNum].pKeyNum
  35.     gMaster.pPhotoList[vNum].pSelected = "yes"
  36.   end if
  37.   if gMaster.pSummaryList[vSavedNum].pType contains "logo" then
  38.     vNum = gMaster.pSummaryList[vSavedNum].pKeyNum
  39.     gMaster.pLogoList[vNum].pSelected = "yes"
  40.   end if
  41.   if gMaster.pSummaryList[vSavedNum].pType contains "poster" then
  42.     vNum = gMaster.pSummaryList[vSavedNum].pKeyNum
  43.     gMaster.pPosterList[vNum].pSelected = "yes"
  44.   end if
  45.   if gMaster.pSummaryList[vSavedNum].pType contains "note" then
  46.     gNotes.pProductionSelected = "yes"
  47.   end if
  48.   if gMaster.pSummaryList[vSavedNum].pType contains "credit" then
  49.     gNotes.pCreditsSelected = "yes"
  50.   end if
  51.   gMaster.pSavedSummaryList[vSavedNum].pSelected = "yes"
  52.   gMaster.pSummaryList[vSavedNum].pSelected = "yes"
  53.   mMainCode(me, vSavedNum)
  54. end
  55.  
  56. on mSetOff me, vSavedNum
  57.   if gMaster.pSummaryList[vSavedNum].pType contains "photo" then
  58.     vNum = gMaster.pSummaryList[vSavedNum].pKeyNum
  59.     gMaster.pPhotoList[vNum].pSelected = "no"
  60.   end if
  61.   if gMaster.pSummaryList[vSavedNum].pType contains "logo" then
  62.     vNum = gMaster.pSummaryList[vSavedNum].pKeyNum
  63.     gMaster.pLogoList[vNum].pSelected = "no"
  64.   end if
  65.   if gMaster.pSummaryList[vSavedNum].pType contains "poster" then
  66.     vNum = gMaster.pSummaryList[vSavedNum].pKeyNum
  67.     gMaster.pPosterList[vNum].pSelected = "no"
  68.   end if
  69.   if gMaster.pSummaryList[vSavedNum].pType contains "note" then
  70.     gNotes.pProductionSelected = "no"
  71.   end if
  72.   if gMaster.pSummaryList[vSavedNum].pType contains "credit" then
  73.     gNotes.pCreditsSelected = "no"
  74.   end if
  75.   gMaster.pSavedSummaryList[vSavedNum].pSelected = "no"
  76.   gMaster.pSummaryList[vSavedNum].pSelected = "no"
  77.   mMainCode(me, vSavedNum)
  78. end
  79.  
  80. on mMainCode me, vSavedNum
  81.   if gMaster.pSavedSettings.blendeffect = "TRUE" then
  82.     if gMaster.pSavedSummaryList[vSavedNum].pSelected = "no" then
  83.       sprite(spriteNum).blend = 100
  84.     else
  85.       sprite(spriteNum).blend = gMaster.pSavedSettings.blendpercent
  86.     end if
  87.   end if
  88.   if gMaster.pSavedSettings.rectangles = "TRUE" then
  89.     if gMaster.pSavedSummaryList[vSavedNum].pSelected = "no" then
  90.       sprite(gMaster.pSavedSummaryList[vSavedNum].pRectSpriteSaved).rect = rect(-2000, -2000, -1999, 1999)
  91.     else
  92.       vLeft = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).left - 2
  93.       vTop = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).top - 2
  94.       vRight = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).right + 2
  95.       vBottom = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).bottom + 2
  96.       sprite(gMaster.pSavedSummaryList[vSavedNum].pRectSpriteSaved).rect = rect(vLeft, vTop, vRight, vBottom)
  97.     end if
  98.   end if
  99.   if gMaster.pSavedSettings.pushpin = "TRUE" then
  100.     if gMaster.pSavedSummaryList[vSavedNum].pSelected = "no" then
  101.       sprite(gMaster.pSavedSummaryList[vSavedNum].pPushPinSpriteSaved).loc = point(-2000, -2000)
  102.     else
  103.       vLeft = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).left + gMaster.pSavedSettings.pinoffset[1]
  104.       vTop = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).top + gMaster.pSavedSettings.pinoffset[2]
  105.       sprite(gMaster.pSavedSummaryList[vSavedNum].pPushPinSpriteSaved).loc = point(vLeft, vTop)
  106.     end if
  107.   end if
  108.   vOK = "no"
  109.   repeat with y = 1 to gMaster.pSummaryList.count
  110.     if gMaster.pSummaryList[y].pSelected = "yes" then
  111.       vOK = "yes"
  112.       exit repeat
  113.     end if
  114.   end repeat
  115.   if vOK = "yes" then
  116.     sendSprite(9, #mSetOnStage)
  117.   else
  118.     sendSprite(9, #mSetOffStage)
  119.   end if
  120. end
  121.